<template>
  <div class="test-consultation-order-detail">
    <div class="page-header">
      <h2>问诊订单详情测试页面</h2>
      <p>测试问诊订单详情页面的功能</p>
    </div>

    <div class="test-section">
      <h3>测试功能</h3>
      
      <div class="test-buttons">
        <button class="test-btn" @click="testOrderDetail(1)">
          测试订单详情 (ID: 1)
        </button>
        
        <button class="test-btn" @click="testOrderDetail(2)">
          测试订单详情 (ID: 2)
        </button>
        
        <button class="test-btn" @click="testOrderDetail(999)">
          测试不存在的订单 (ID: 999)
        </button>
      </div>

      <div class="test-info">
        <h4>测试说明：</h4>
        <ul>
          <li>点击上面的按钮可以测试不同订单ID的详情页面</li>
          <li>ID 1 和 2 应该能正常显示订单详情</li>
          <li>ID 999 应该显示错误信息</li>
          <li>页面包含订单基本信息、患者信息、医生信息、问诊信息、支付信息等</li>
          <li>提供立即支付、取消订单、修改订单等操作按钮</li>
        </ul>
      </div>
    </div>

    <div class="navigation-section">
      <h3>页面导航</h3>
      <div class="nav-buttons">
        <button class="nav-btn" @click="goToManagement">
          返回问诊单管理
        </button>
        
        <button class="nav-btn" @click="goToHome">
          返回首页
        </button>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()

// 测试订单详情
const testOrderDetail = (orderId: number) => {
  router.push(`/consultation-order-detail/${orderId}`)
}

// 返回问诊单管理
const goToManagement = () => {
  router.push('/consultation-order-management')
}

// 返回首页
const goToHome = () => {
  router.push('/home')
}
</script>

<style scoped>
.test-consultation-order-detail {
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 30px;
  text-align: center;
}

.page-header h2 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 24px;
}

.page-header p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.test-section {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.test-section h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 18px;
}

.test-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.test-btn {
  padding: 12px 20px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}

.test-btn:hover {
  background: #0056b3;
}

.test-info {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 15px;
}

.test-info h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 16px;
}

.test-info ul {
  margin: 0;
  padding-left: 20px;
  color: #666;
  line-height: 1.6;
}

.test-info li {
  margin-bottom: 5px;
}

.navigation-section {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navigation-section h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 18px;
}

.nav-buttons {
  display: flex;
  gap: 15px;
}

.nav-btn {
  padding: 10px 20px;
  background: #f8f9fa;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.nav-btn:hover {
  background: #e9ecef;
}

@media (max-width: 768px) {
  .test-consultation-order-detail {
    padding: 10px;
  }
  
  .test-buttons {
    flex-direction: column;
  }
  
  .nav-buttons {
    flex-direction: column;
  }
}
</style> 